package com.atcd.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;


//用来发送rest风格的，远程访问其他服务器的方法RestTemplate
@Configuration

public class ApplicationContextConfig {

    @Bean
//    @LoadBalanced  用自己写的负载均衡算法
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}
 
 
